package com.zhong.controller;

import com.zhong.service.AccountServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author itsome on 2021-08-28 08:08:12
 */
@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private AccountServiceImpl accountService;

    @PutMapping("/{userId}/{money}")
    public void debit(@PathVariable("userId") String userId, @PathVariable("money") Integer money){
        accountService.debit(userId, money);
    }
}
